package com.bsh.service;

import java.math.BigDecimal;

import com.bsh.mybatis.model.CloudUserGoods;

public interface CloudUserGoodsService {
	
	/**
	 * 添加兑换信息
	 * @param cloudUserGoods
	 * @return
	 */
	Integer addCloudUserGoods(CloudUserGoods cloudUserGoods);
	
	/**
	 * 扣减商币
	 * @return
	 */
	Integer DeductCloudMoney(int accountId,int userid,String sn,String ip,BigDecimal cloudMoney);


	/**
	 * 赠送商币
	 * @param accountId
	 * @param userid
	 * @param sn
	 * @param ip
	 * @param cloudMoney
	 * @return
	 */
    Integer sendCloudMoney(int accountId, int userid,int toAccountId, int toUserid, String sn,
			String ip, BigDecimal cloudMoney,String memo);
    
    /**
     * 购买商币
     * @param accountId
     * @param userid
     * @param toAccountId
     * @param toUserid
     * @param sn
     * @param ip
     * @param money
     * @param selfCloudMoney
     * @param otherCloudMoney
     * @return
     */
    Integer buyCloudMoney(int accountId, int userid,int toAccountId, int toUserid, String sn,	String ip,BigDecimal money, BigDecimal selfCloudMoney,BigDecimal otherCloudMoney);
    
    /**
     * 商币兑换股权
     * @param accountId
     * @param userid
     * @param sn
     * @param ip
     * @param cloudMoney
     * @return
     */
    Integer changeCloudMoneyToShare(int accountId, int userid, String sn,String ip,BigDecimal cloudMoney,BigDecimal cloudShares);

}




